package com.yanqu.road.server.timer.union;

import com.yanqu.road.server.manager.unioncampwar.CrossUnionCampWarLockGroupMgr;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.executor.GeneralTask;

public class CrossUnionCampWarGroupCheckTask extends GeneralTask {
    private long checkGroupingTime = 0;

    @Override
    public void doRun() {
        try {
            // 1分钟检查一次分组
            if (System.currentTimeMillis() - checkGroupingTime > DateHelper.SECOND_MILLIONS*10) {
                CrossUnionCampWarLockGroupMgr.checkGrouping();
                checkGroupingTime = System.currentTimeMillis();
            }
        } catch (Exception e) {
            getLOGGER().error("error : ", e);
        }
    }

}
